package org.mock.service.impl;

import lombok.AllArgsConstructor;
import org.mock.common.Condition;
import org.mock.dto.TravelCreatePassengerDTO;
import org.mock.entity.TravelCreatePassenger;
import org.mock.mapper.TravelCreatePassengerMapper;
import org.mock.service.TravelCreatePassengerService;
import org.mock.utils.BeanCopyUtils;
import org.springframework.stereotype.Service;

/**
 * travel_create_passenger 服务实现类
 *
 * @author AI
 * @since 2025-06-11
 */
@Service
@AllArgsConstructor
public class TravelCreatePassengerServiceImpl implements TravelCreatePassengerService {

    protected TravelCreatePassengerMapper travelCreatePassengerMapper;

    @Override
    public Integer updateById(TravelCreatePassengerDTO dto) {
        return travelCreatePassengerMapper.updateById(BeanCopyUtils.copy(dto,TravelCreatePassenger.class));
    }

    @Override
    public TravelCreatePassenger getOne(TravelCreatePassengerDTO dto) {
        return travelCreatePassengerMapper.selectOne(Condition.getQueryWrapper(BeanCopyUtils.copy(dto,TravelCreatePassenger.class)));
    }
}
